Skip to content

Conversation

AayushSabharwal
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@ChrisRackauckas ChrisRackauckas merged commit 9980686 into SciML:master Jan 10, 2024
@AayushSabharwal AayushSabharwal deleted the as/linear-indexing branch January 30, 2024 06:37
@vchuravy
Copy link
Contributor

function Adapt.adapt_structure(to, VA::AbstractVectorOfArray)
    Adapt.adapt(to, Array(VA))
end

This definition was surprising to me. I epected it to return a VectorOfArray whose underlying tuple is adapted.

@ChrisRackauckas
Copy link
Member

It doesn't have an underlying tuple, it's an array of arrays. But yes, that is probably not right, it probably should recurse running adapt.

@ChrisRackauckas
Copy link
Member

do you have a test case that is sensitive to this?

@ChrisRackauckas
Copy link
Member

I made #434, but the tricky thing is always that GPUArrays cannot have other GPUArrays, so the structure would need to be Array of GPUArrays and I think VectorOfArray works out in that case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants